Package org.kapott.hbci.manager

Examples of org.kapott.hbci.manager.FlickerCode$DE


      // 1. Prioritaet hat hhduc. Gibts aber erst seit HITAN4
      if (hhduc != null && hhduc.trim().length() > 0)
      {
        try
        {
          FlickerCode code = new FlickerCode(hhduc);
          return code.render();
        }
        catch (Exception e)
        {
          HBCIUtils.log("unable to parse Challenge HHDuc " + hhduc + ":" + HBCIUtils.exception2String(e),HBCIUtils.LOG_DEBUG);
        }
      }
     
      // 2. Checken, ob im Freitext-Challenge was parse-faehiges steht.
      // Kann seit HITAN1 auftreten
      if (challenge != null && challenge.trim().length() > 0)
      {
        try
        {
          FlickerCode code = new FlickerCode(challenge);
          return code.render();
        }
        catch (Exception e)
        {
          // Das darf durchaus vorkommen, weil das Challenge auch bei manuellem
          // chipTAN- und smsTAN Verfahren verwendet wird, wo gar kein Flicker-Code enthalten ist.
View Full Code Here


   * @throws Exception
   */
  @Test
  public void test7() throws Exception
  {
    FlickerCode code = new FlickerCode("190277071234567041,00");
   
    FlickerCode expected = new FlickerCode();
    expected.lc = 19;
    expected.startCode.lde      = 2;
    expected.startCode.length   = 2;
    expected.startCode.data     = "77";
    expected.de1.lde      = 7;
View Full Code Here

   * @throws Exception
   */
  @Test
  public void test8() throws Exception
  {
    FlickerCode code = new FlickerCode("250891715637071234567041,00");
    Assert.assertEquals(code.version,HHDVersion.HHD13);
    Assert.assertEquals(0,code.startCode.controlBytes.size());
  }
View Full Code Here

  @Test
  public void testRender1() throws Exception
  {
    // Beispiel-Code aus der Spec
    // Belegungsrichtlinien TANve1.4  mit Erratum 1-3 final version vom 2010-11-12.pdf
    FlickerCode code = new FlickerCode("0248A0120452019980812345678");
    String flicker = code.render();
   
    // Die gesammelten Daten
    final StringBuffer collected = new StringBuffer();

    // Wir loggen mit, was der Renderer ausgibt und vergleichen es mit unseren Daten.
View Full Code Here

   */
  @Test
  public void test1() throws Exception
  {
    // Code von einem User - anonymisiert
    FlickerCode code = new FlickerCode("039870110490631098765432100812345678041,00");

    FlickerCode expected = new FlickerCode();
    expected.lc = 39;
    expected.startCode.lde      = 135;
    expected.startCode.length   = 7;
    expected.startCode.data     = "1049063";
    expected.startCode.encoding = null;
View Full Code Here

   */
  @Test
  public void test2() throws Exception
  {
    // Code von einem User - anonymisiert
    FlickerCode code = new FlickerCode("039870110418751012345678900812030000040,20");

    FlickerCode expected = new FlickerCode();
    expected.lc = 39;
    expected.startCode.lde      = 135;
    expected.startCode.length   = 7;
    expected.startCode.data     = "1041875";
    expected.startCode.encoding = null;
View Full Code Here

  @Test
  public void test3() throws Exception
  {
    // Beispiel-Code aus der Spec
    // Belegungsrichtlinien TANve1.4  mit Erratum 1-3 final version vom 2010-11-12.pdf
    FlickerCode code = new FlickerCode("0248A0120452019980812345678");
     
    FlickerCode expected = new FlickerCode();
    expected.lc = 24;
    expected.startCode.lde      = 138;
    expected.startCode.length   = 10;
    expected.startCode.data     = "2045201998";
    expected.startCode.encoding = null;
View Full Code Here

    // des TAN-Dialoges
    // Das zwischen "CHLGUC$4zahlen" und "CHLGTEXT" ist der Flickercode.
    // Das $4zahlen gibt IMHO an, wie lang der danach folgende Flicker-Code ist
    // ...TAN-Nummer: CHLGUC 002624088715131306389726041,00CHLGTEXT0244 Sie haben eine...

    FlickerCode code = new FlickerCode("...TAN-Nummer: CHLGUC 002624088715131306389726041,00CHLGTEXT0244 Sie h...");

    // Das hier soll am Ende rauskommen
    FlickerCode expected = new FlickerCode();
    expected.lc = 24;
    expected.startCode.lde      = 8;
    expected.startCode.length   = 8;
    expected.startCode.data     = "87151313";
    expected.startCode.encoding = null;
View Full Code Here

   * @throws Exception
   */
  @Test
  public void test5() throws Exception
  {
    FlickerCode code = new FlickerCode("0248A01204520199808123F5678");
     
    FlickerCode expected = new FlickerCode();
    expected.lc = 24;
    expected.startCode.lde      = 138;
    expected.startCode.length   = 10;
    expected.startCode.data     = "2045201998";
    expected.startCode.encoding = null;
View Full Code Here

   * @throws Exception
   */
  @Test
  public void test6() throws Exception
  {
    FlickerCode code = new FlickerCode();
    code.version = HHDVersion.HHD14;
    code.startCode.data = "1120492";
    code.startCode.controlBytes.add(1);
    code.de1.data = "30084403";
    code.de2.data = "450,00";
    code.de3.data = "2";
   
    String rendered = code.render();
    Assert.assertEquals(rendered,"1584011120492F0430084403463435302C3030012F05");
  }
View Full Code Here

TOP

Related Classes of org.kapott.hbci.manager.FlickerCode$DE

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.