Keyczar.EncryptedKeySet.GetKeyData C# (CSharp) Method

GetKeyData() public method

Gets the binary data that the key is stored in.
public GetKeyData ( int version ) : byte[]
version int The version.
return byte[]
        public byte[] GetKeyData(int version)
        {
            var cipherData = _keySet.GetKeyData(version);
            if (!Metadata.Encrypted)
            {
                return cipherData;
            }

            var cipherString = Keyczar.RawStringEncoding.GetString(cipherData);
            return _crypter.Decrypt(WebSafeBase64.Decode(cipherString.ToCharArray()));
        }