Navigation: Developing Apps > BINETIX® AGE™ API > Plugins > Cryptela™ > Functions
get_info/2
Description
get_info/2 is an Erlang function exported by "cryptela" module.
Decrypts an unprotected storage and retrieves the fields of selected certificate within that storage. Otherwise returns error, like {error,invalid_store}.
References
•create/3
Parameters
Name
Type
Storage
binary()
Certificates storage.
Order
integer()
Optional. Selects the certificate's sequence number from the storage. Defaults to 0.
Result
Value or Type
[]
On success returns list with decrypted fields.
Code Sample
> Storage = cryptela:create("Test", []).
> cryptela:get_info(Storage).
[
{valid,"yes"},
{signer,"yes"},
{self_signed,"yes"},
{expired,"no"},
{title,[]},
{serial_number,[]},
{initials,[]},
{surname,[]},
{given_name,[]},
{expire_date,"2019-08-11T14:27:43"},
{start_date,"2019-07-12T14:27:43"},
{private_key,"yes"},
{email,[]},
{organization_unit,[]},
{organization,[]},
{province,[]},
{location,[]},
{country,[]},
{name,"Test"}
]