I hereby claim:
- I am c0br4ch on github.
- I am cobra (https://keybase.io/cobra) on keybase.
- I have a public key ASADxKryDVcvMaepOa3PfcABgbM-S-M80Tk7QJp3EfuiIAo
To claim this, I am signing this object:
using System; | |
using System.Security.Cryptography; | |
namespace SaltyCrypter | |
{ | |
/// <summary> | |
/// Creates the salt and hash for a password | |
/// </summary> | |
public class CryptoMagic | |
{ |
public static <T extends Object> T deserialize(Path xmlFile, Class<T> clazz) { | |
try { | |
JAXBContext context = JAXBContext.newInstance(clazz); | |
Unmarshaller unmarshaller = context.createUnmarshaller(); | |
return (T) unmarshaller.unmarshal(xmlFile.toFile()); | |
} catch (Exception e) { | |
String message = "Error while deserializing XML."; | |
// Let's make some fancy magic to get understandable Exception messages! | |
if (e instanceof IllegalAnnotationsException) { |
/// <summary> | |
/// Source initialization | |
/// </summary> | |
/// <param name="sender">sender</param> | |
/// <param name="e">args</param> | |
void Window_SourceInitialized(object sender, System.EventArgs e) | |
{ | |
// Get handler for WPF window and hook into it | |
IntPtr windowHandle = (new WindowInteropHelper(this)).Handle; | |
HwndSource.FromHwnd(windowHandle).AddHook(new HwndSourceHook(WindowProc)); |
public static class OLEObjectUtil | |
{ | |
private const string BITMAP_OLE_HEADER = "BM"; | |
private const string JPG_OLE_HEADER = "\u00FF\u00D8\u00FF"; | |
private const string PNG_OLE_HEADER = "\u0089PNG\r\n\u001a\n"; | |
private const string GIF_OLE_HEADER = "GIF8"; | |
private const string TIFF_OLE_HEADER = "II*\u0000"; | |
public static byte[] RemoveOleHeader(byte[] inputBytes) | |
{ |
I hereby claim:
To claim this, I am signing this object: