completed getDecrypted() function.