lib/AppleDecrypter.rb
##
# This function performs an AES key unwrap function. It expects the +wrapped_key+ as a binary String 
# and the +key_encrypting_key+ as a binary String. It returns either nil of the unwrapped key as a binary 
# String. 
This function performs an AES key unwrap function. It expects the +wrapped_key+ as a binary String
and the +key_encrypting_key+ as a binary String. It returns either nil of the unwrapped key as a binary
String.
This function performs an AES key unwrap function . It expects the + wrapped_key + as a binary String and the + key_encrypting_key + as a binary String . It returns either nil of the unwrapped key as a binary String .
def aes_key_unwrap(wrapped_key, key_encrypting_key)
    unwrapped_key = nil
    begin
      unwrapped_key = AESKeyWrap.unwrap!(wrapped_key, key_encrypting_key)
    rescue AESKeyWrap::UnwrapFailedError
    end
    return unwrapped_key
  end
def aes_key_unwrap ( wrapped_key , key_encrypting_key ) unwrapped_key = nil begin unwrapped_key = AESKeyWrap . unwrap! ( wrapped_key , key_encrypting_key ) rescue AESKeyWrap :: UnwrapFailedError end return unwrapped_key end
This function performs an AES key unwrap function.
This function performs an AES key unwrap function .
# Not logging this because it will get spammy if different accounts have different passwords
wrapped_key
key_encrypting_key