Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************
- * PKCS#8 ASN.1 Specification
- * Use the API wrappers below to assist with easily decoding a PKCS#8
- * DER-encoded public key format
- */
- struct cryptx_pkcs8_asn1_obj {
- struct cryptx_asn1_obj publickeyinfo[3]; /**< holds object refs for algorithm id, NULL byte, and public key bit string */
- struct cryptx_asn1_obj publickey[2]; /**< holds object refs for public modulus and public exponent */
- };
- static void cryptx_asn1_pkcs8_decode(void *data, size_t datalen, struct cryptx_pkcs8_asn1_obj *obj){
- cryptx_asn1_decode(data, datalen, obj->publickeyinfo, 3);
- cryptx_asn1_decode(obj->publickeyinfo[2].data, obj->publickeyinfo[2].len, obj->publickey, 2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement